export function formatDate(value) {
    const date = new Date(value);
    const localDate = new Date(date.getTime() + date.getTimezoneOffset() * 60 * 1000);

    const year = localDate.getFullYear();
    const month = String(localDate.getMonth() + 1).padStart(2, "0");
    const day = String(localDate.getDate()).padStart(2, "0");
    const hours = String(localDate.getHours()).padStart(2, "0");
    const minutes = String(localDate.getMinutes()).padStart(2, "0");
    const seconds = String(localDate.getSeconds()).padStart(2, "0");

    return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
}

export function removeBrTags() {
    // 使用正则表达式将<br>标签替换为空字符串
    return value.replace(/<br>/g, '');
}